import GroupsJoin from '@/views/groups/join';
import GroupsShow from '@/views/groups/show';
import GroupsHomepage from '@/views/groups/show/homepage';
import GroupsMembers from '@/views/groups/show/members';
import GroupsActivities from '@/views/groups/show/activities';
import GroupsAnnouncements from '@/views/groups/show/announcements';
import GroupsAnnouncementsShow from '@/views/groups/show/announcements/show';
import GroupsSettings from '@/views/groups/show/settings';

export default [
  {
    path: '/groups/join/:joinKey',
    component: GroupsJoin,
    meta: { requireAuth: true },
  },
  {
    path: '/groups/:groupId',
    component: GroupsShow,
    meta: { sidebar: true, requireAuth: true },
    children: [
      {
        path: 'homepage',
        alias: '',
        component: GroupsHomepage,
      },
      {
        path: 'members',
        component: GroupsMembers,
      },
      {
        path: 'activities',
        component: GroupsActivities,
      },
      {
        path: 'announcements',
        component: GroupsAnnouncements,
      },
      {
        path: 'announcements/:anncId',
        component: GroupsAnnouncementsShow,
      },
      {
        path: 'settings',
        component: GroupsSettings,
        meta: { requireAdmin: true },
      },
    ],
  },
];
